import { MvpClient } from "../sdk/mvpClient";

export function mole() {
  console.log("leemoon 14");
  return "leemoon";
}

// 创建客户端实例
const client = new MvpClient({
  baseURL: "https://your-api-url",
  apiKey: "your-api-key"
});

// 封装API调用函数
export async function testSDK() {
  try {
    // 登录
    const loginResult = await client.login("username", "password");
    console.log('登录结果：', loginResult);

    // 获取用户信息
    const userProfile = await client.getUserProfile();
    console.log('用户信息：', userProfile);

    // 上报数据
    await client.reportData({
      eventType: "pageView",
      timestamp: Date.now()
    });
    console.log('数据上报成功');

    // 获取配置
    const config = await client.getConfig("feature-flags");
    console.log('配置信息：', config);
  } catch (error) {
    console.error('测试过程出错：', error);
  }
}
